package com.binge.test.builder;

import java.util.ArrayList;

public class Director {

        private ArrayList<String> sequence = new ArrayList<>();

        private CarBuilder benzCarBuilder = new BenzCarBuilder();

        private CarBuilder bmwCarBuilder = new BmwCarBuilder();

        public CarTemplate getABenzCar() {
            this.sequence.clear();
            this.sequence.add("start");
            this.sequence.add("stop");
            this.benzCarBuilder.setSequence(this.sequence);
            return this.benzCarBuilder.getCar();
        }

        public CarTemplate getBBenzCar() {
            this.sequence.clear();
            this.sequence.add("start");
            this.sequence.add("alarm");
            this.sequence.add("stop");
            this.benzCarBuilder.setSequence(this.sequence);
            return this.benzCarBuilder.getCar();
        }

        public CarTemplate getABmwCar() {
            this.sequence.clear();
            this.sequence.add("start");
            this.sequence.add("stop");
            this.bmwCarBuilder.setSequence(this.sequence);
            return this.bmwCarBuilder.getCar();
        }

        public CarTemplate getBBmwCar() {
            this.sequence.clear();
            this.sequence.add("start");
            this.sequence.add("alarm");
            this.sequence.add("stop");
            this.bmwCarBuilder.setSequence(this.sequence);
            return this.bmwCarBuilder.getCar();
        }
}
